package com.schoolgard.entitybean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ParamServer entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "PARAM_SERVER")
public class ParamServer implements java.io.Serializable {

	// Fields

	private String guid;
	private Device device;
	private String name;
	private String ip;
	private Short terminalCount;
	private Integer portCtrl;
	private Integer portData;
	private Integer portFtp;
	private Integer portHttp;
	private String managerServerIp;
	private String managerServerUser;
	private String managerServerPwd;
	private String backupServerIp;
	private String hasAudio;
	private String comParam;

	// Constructors

	/** default constructor */
	public ParamServer() {
	}

	/** minimal constructor */
	public ParamServer(String guid, Device device) {
		this.guid = guid;
		this.device = device;
	}

	/** full constructor */
	public ParamServer(String guid, Device device, String name, String ip,
			Short terminalCount, Integer portCtrl, Integer portData,
			Integer portFtp, Integer portHttp, String managerServerIp,
			String managerServerUser, String managerServerPwd,
			String backupServerIp, String hasAudio, String comParam) {
		this.guid = guid;
		this.device = device;
		this.name = name;
		this.ip = ip;
		this.terminalCount = terminalCount;
		this.portCtrl = portCtrl;
		this.portData = portData;
		this.portFtp = portFtp;
		this.portHttp = portHttp;
		this.managerServerIp = managerServerIp;
		this.managerServerUser = managerServerUser;
		this.managerServerPwd = managerServerPwd;
		this.backupServerIp = backupServerIp;
		this.hasAudio = hasAudio;
		this.comParam = comParam;
	}

	// Property accessors
	@Id
	@Column(name = "GUID", unique = true, nullable = false, length = 64)
	public String getGuid() {
		return this.guid;
	}

	public void setGuid(String guid) {
		this.guid = guid;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "GUID", unique = true, nullable = false, insertable = false, updatable = false)
	public Device getDevice() {
		return this.device;
	}

	public void setDevice(Device device) {
		this.device = device;
	}

	@Column(name = "NAME", length = 64)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "IP", length = 64)
	public String getIp() {
		return this.ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	@Column(name = "TERMINAL_COUNT", precision = 3, scale = 0)
	public Short getTerminalCount() {
		return this.terminalCount;
	}

	public void setTerminalCount(Short terminalCount) {
		this.terminalCount = terminalCount;
	}

	@Column(name = "PORT_CTRL", precision = 5, scale = 0)
	public Integer getPortCtrl() {
		return this.portCtrl;
	}

	public void setPortCtrl(Integer portCtrl) {
		this.portCtrl = portCtrl;
	}

	@Column(name = "PORT_DATA", precision = 5, scale = 0)
	public Integer getPortData() {
		return this.portData;
	}

	public void setPortData(Integer portData) {
		this.portData = portData;
	}

	@Column(name = "PORT_FTP", precision = 5, scale = 0)
	public Integer getPortFtp() {
		return this.portFtp;
	}

	public void setPortFtp(Integer portFtp) {
		this.portFtp = portFtp;
	}

	@Column(name = "PORT_HTTP", precision = 5, scale = 0)
	public Integer getPortHttp() {
		return this.portHttp;
	}

	public void setPortHttp(Integer portHttp) {
		this.portHttp = portHttp;
	}

	@Column(name = "MANAGER_SERVER_IP", length = 64)
	public String getManagerServerIp() {
		return this.managerServerIp;
	}

	public void setManagerServerIp(String managerServerIp) {
		this.managerServerIp = managerServerIp;
	}

	@Column(name = "MANAGER_SERVER_USER", length = 32)
	public String getManagerServerUser() {
		return this.managerServerUser;
	}

	public void setManagerServerUser(String managerServerUser) {
		this.managerServerUser = managerServerUser;
	}

	@Column(name = "MANAGER_SERVER_PWD", length = 32)
	public String getManagerServerPwd() {
		return this.managerServerPwd;
	}

	public void setManagerServerPwd(String managerServerPwd) {
		this.managerServerPwd = managerServerPwd;
	}

	@Column(name = "BACKUP_SERVER_IP", length = 64)
	public String getBackupServerIp() {
		return this.backupServerIp;
	}

	public void setBackupServerIp(String backupServerIp) {
		this.backupServerIp = backupServerIp;
	}

	@Column(name = "HAS_AUDIO", length = 2)
	public String getHasAudio() {
		return this.hasAudio;
	}

	public void setHasAudio(String hasAudio) {
		this.hasAudio = hasAudio;
	}

	@Column(name = "COM_PARAM", length = 64)
	public String getComParam() {
		return this.comParam;
	}

	public void setComParam(String comParam) {
		this.comParam = comParam;
	}

}